package com.kongjs.common.rest.util;

import org.springframework.beans.ConversionNotSupportedException;
import org.springframework.beans.TypeMismatchException;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.http.converter.HttpMessageNotWritableException;
import org.springframework.validation.method.MethodValidationException;
import org.springframework.web.ErrorResponseException;
import org.springframework.web.HttpMediaTypeNotAcceptableException;
import org.springframework.web.HttpMediaTypeNotSupportedException;
import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.MissingPathVariableException;
import org.springframework.web.bind.MissingServletRequestParameterException;
import org.springframework.web.bind.ServletRequestBindingException;
import org.springframework.web.context.request.async.AsyncRequestNotUsableException;
import org.springframework.web.context.request.async.AsyncRequestTimeoutException;
import org.springframework.web.method.annotation.HandlerMethodValidationException;
import org.springframework.web.multipart.MaxUploadSizeExceededException;
import org.springframework.web.multipart.support.MissingServletRequestPartException;
import org.springframework.web.servlet.NoHandlerFoundException;
import org.springframework.web.servlet.resource.NoResourceFoundException;

public class Main {
    public static void main(String[] args) {
        Class<?>[] classes = new Class[]{
                // 请求错误
                HttpRequestMethodNotSupportedException.class,
                HttpMediaTypeNotSupportedException.class,
                HttpMediaTypeNotAcceptableException.class,
                HttpMessageNotReadableException.class,
                HttpMessageNotWritableException.class,
                // 参数错误
                ServletRequestBindingException.class,
                MissingPathVariableException.class,
                MissingServletRequestParameterException.class,
                MissingServletRequestPartException.class,
                MethodArgumentNotValidException.class,
                HandlerMethodValidationException.class,
                MethodValidationException.class,
                MaxUploadSizeExceededException.class,
                // 未找到
                NoHandlerFoundException.class,
                NoResourceFoundException.class,
                // 类型错误
                ErrorResponseException.class,
                TypeMismatchException.class,
                ConversionNotSupportedException.class,
                // 异步
                AsyncRequestTimeoutException.class,
                AsyncRequestNotUsableException.class
        };
        for (Class<?> aClass : classes) {
            System.out.println(aClass.getName()+"=");
        }
    }
}
